<?php $this->load->view('inc/header'); ?>
<!--one colunm-->

<?php
	$this->db->where('c_org_id',$id);
	$query = $this->db->get('content_of_organization');
	foreach($query->result() as $rows){
		$c_org_title = $rows->c_org_title;
		$c_org_content = $rows->c_org_content;
	}
?>

<div class="grid_12" style="background-color:#CCCCCC; padding-top:20px; padding-bottom:15px;">
  <div class="grid_12 alpha" id="one_cols1">
    <div id="topic">
      <?=$topic?>
    </div>
  </div>
  <div class="grid_12 alpha"  id="one_cols2">
    <div id="text">
      <form method="post" action="<?=base_url()?>organization/edit_org_news_by_id">
      	<label>หัวข้อ </label>
        <input name="c_org_title" type="text" id="c_org_title" size="119" maxlength="100" value="<?=$c_org_title?>"/>
        <br/>
        <br/>
        <label>เลือกหน่วยงาน</label>
        <select name="org_id" id="org_id">
        	<?php 
			$query = $this->db->query('SELECT org_id,org_name FROM organization'); 
				foreach($query->result_array() as $rows)
				{
					$org_id = $rows['org_id'];
					$org_name = $rows['org_name'];
					 echo "<option value='$org_id'>$org_name</option>";
				}
			?>
        </select>
        <br/>
        <br/>
        <textarea name="content_2" id="content_2"> <?=$c_org_content?>
		</textarea>
       	<?php echo display_ckeditor($ckeditor_2); ?>
        </textarea>
        <br/>
        <input type="hidden" name="c_org_id" id="c_org_id" value="<?=$id?>"/>
        <input type="submit" value="สร้างหัวข้อข่าวสารใหม่">
      </form>
    </div>
  </div>
  <div class="grid_12 alpha" id="one_cols3"></div>
</div>
<div class="clear"></div>
<!--end one column-->
<?php $this->load->view('inc/footer'); ?>
